home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / MAGS.ZIP / VLAD#3.ZIP / ARTICLE.2_7 < prev    next >
Encoding:
Text File  |  1995-02-01  |  4.6 KB  |  127 lines

  1.                     
  2.                     T R I C K I N G   P R O V I E W
  3.                                Written by
  4.                               Darkman/VLAD
  5.  
  6. ------------
  7. Introduction
  8. ------------
  9.  
  10.   This document is an example of how to trick PROVIEW, by changing the
  11. address of interrupt 21h and point it to the hole in the memory, after the
  12. interrupt table. In the memory hole we create a jump to the virus code and
  13. the virus code will return to the original interrupt 21h.
  14.  
  15. -----------
  16. Information
  17. -----------
  18.  
  19.   Analysing the interrupt vectors with PROVIEW, would usually look something
  20. like this:
  21.  
  22. No T Interrupt Name                 Address    Points to
  23. 21 √ DOS Function call              0021:40F8  DOS CODE
  24.  
  25.   When a virus is resident, the analysis of the interrupt vectors with
  26. PROVIEW, will usual look something like this:
  27.  
  28. No T Interrupt Name                 Address    Points to
  29. 21 √ DOS Function call              9FC8:0062  !!! Unknown !!!
  30.  
  31.   When a virus, which tricks PROVIEW, is resident, the analysis of the
  32. interrupt vectors with PROVIEW, will look like this:
  33.  
  34. No T Interrupt Name                 Address    Points to
  35. 21 √ DOS Function call              001E:0000  Interrupt Vector Table
  36.  
  37. -------------------------------
  38. McAfee Associates about PROVIEW
  39. -------------------------------
  40.  
  41.      PROVIEW (tm) Integrated System Analyzer and Viewer
  42.        Copyright (C) 1992 - 1993 by McAfee Associates
  43.                     All rights reserved
  44.  
  45.  
  46.      PROVIEW is a menu driven program used to analyze, view
  47.      and edit the basic components of a system, including the
  48.      system memory, system interrupts, device drivers, and
  49.      installed disk drive sectors and file contents.  PROVIEW 
  50.      will allow you to view system elements in HEX, ASCII or 
  51.      disassembled code format.  Full searching and editing 
  52.      functions are included.
  53.  
  54.  
  55.      Interrupts
  56.  
  57.           View/Edit the System Interrupt Vectors.  Proview 
  58.           indicates which ones are currently in use, their
  59.           memory addresses, owners and interrupt chains. 
  60.           You may display/edit the actual interrupt code in 
  61.           hex or ASM format.
  62.  
  63. --------------------
  64. How to trick PROVIEW
  65. --------------------
  66.  
  67. The below steps must be followed to trick PROVIEW:
  68.  
  69.   1. Load and store address of interrupt 21h.
  70.   2. Create a jump far in the memory hole.
  71.  
  72. ---------------------------------------
  73. Load and store address of interrupt 21h
  74. ---------------------------------------
  75.  
  76.   The below code shows a example of how to load and store the address of
  77. interrupt 21h:
  78.  
  79. ;------------------------------------------------------------=< cut here >=-
  80.              xor     ax,ax               ; Clear AX
  81.              mov     ds,ax               ; DS = segment of interrupt table
  82.              xchg    ax,ds:[21h*04h]     ; Load and store offset of INT 21h
  83.              mov     es:[int21off],ax    ; Store offset of INT 21h
  84.              mov     ax,1eh              ; AX = segment of hole in memory
  85.              xchg    ax,ds:[21h*04h+02h] ; Load and store segment of INT 21h
  86.              mov     es:[int21seg],ax    ; Store segment of INT 21h
  87. ;------------------------------------------------------------=< cut here >=-
  88.  
  89.   This code presumes that two variables of a word called int21off and
  90. int21seg exists.
  91.  
  92. ------------------------------------
  93. Create a jump far in the memory hole
  94. ------------------------------------
  95.  
  96.   The below code shows a example of how to create a jump far in the
  97. memory hole:
  98.  
  99. ;------------------------------------------------------------=< cut here >=-
  100.              mov     byte ptr ds:[1e0h],0eah
  101.              mov     word ptr ds:[1e1h],offset virusint21
  102.              mov     ds:[1e3h],es        ; Store segment of virusint21
  103. ;------------------------------------------------------------=< cut here >=-
  104.  
  105.   This code presumes that a procedure called virusint21 exists.
  106.  
  107. ----------------------------------------------------
  108. Necessary labels, variables and code to the examples
  109. ----------------------------------------------------
  110.  
  111.   The above examples presumes that two variables of a word called int21off
  112. and int21seg exists. These variables holds the address of the original
  113. interrupt 21h.
  114.  
  115.   The above examples presumes that a procedure called virusint21 exists. This
  116. procedure is interrupt 21h of the virus.
  117.  
  118. ---------------------
  119. Final tips and tricks
  120. ---------------------
  121.  
  122. - Encrypt the jump far in the memory hole, then PROVIEW can't disassemble
  123.   it.
  124. - Use a lot anti-heuristic's, so other programs can't find the virus either.
  125. - Remember to optimize your code.
  126.  
  127.